package com.ccz.demo.design.combination;

public abstract class Component {
    //增加成员
    public void add(Component c) {
        throw new UnsupportedOperationException("对象不支持此功能");
    }

    //删除成员
    public void remove(Component c) {
        throw new UnsupportedOperationException("对象不支持此功能");
    }

    //获取成员
    public Component getChild(int i) {
        throw new UnsupportedOperationException("对象不支持此功能");
    }

    public abstract void operation(String preStr);  //业务方法

}
